import { createApp } from 'vue'
import { createRouter, createWebHashHistory } from 'vue-router';
import './style.css'
import App from './App.vue'
import 'uno.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import ElementPlus from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import EventBus from '@/utils/eventBus.js'
// 引入字体文件
import './assets/font/pangmen.css'
const $eventBus = new EventBus();
export const router = createRouter({
  history: createWebHashHistory(),
  strict: true, // 严格模式
  routes: []
});
const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.use(router)
app.use(ElementPlus, { locale: zhCn })
app.provide('$eventBus', $eventBus);
app.config.globalProperties.$eventBus = $eventBus;
app.mount('#app')
